<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   	<%@ include file="/page/commen/common.jsp" %>
    <title>注册页面</title>
	<script type="text/javascript">	
$(document).ready(function(){
			$.formValidator.initConfig({formid:"CustomInfoForm",onerror:function(msg){document.getElementById(
				"errormsg").innerHTML="验证未通过，具体错误请看错误提示!!";},onsuccess:function(){return true;}});
				
			$("#companyName").formValidator({onshow:"公司名称需为未注册过的合法公司",onfocus:"公司名称必须输入,需为未注册过的公司",oncorrect:"公司名称合法"})
			.inputValidator({min:1,onerror:"公司名称不能为空"})
			.inputValidator({max:50,onerror:"公司名称不能超过50个字"}) 
			.regexValidator({regexp:"char",datatype:"enum",onerror:"公司名称不能输入特殊字符"})
				.ajaxValidator({
					type : "post",
					url : "validateCompanyName.do",
					datatype : "json",
					success: function(data){
						if(data == "0"){
							return true;
						}else{
							return false;
						}
					},
					buttons : $("#button"),
					error : function(){Ext.Msg.alert("提示","服务器没有返回数据，可能服务器忙，请重试");},
					onerror : "该公司名称已经注册，请更换公司名称",
					onwait : "正在对公司名称进行合法性校验，请稍候..."
				});
				
			$("#mobileNumber").formValidator({onshow:"请输入请输入手机号码",onfocus:"手机号码必须输入",oncorrect:"输入了正确的手机号码"})
				.regexValidator({regexp:"mobile",datatype:"enum",onerror:"输入的手机号码格式不正确"});
			
	        $("#companyTel").formValidator({onshow:"请输入公司电话，例如0755-88888888",onfocus:"例如：0755-88888888",oncorrect:"输入了正确的公司电话号码"})
	        .regexValidator({regexp:"tel",datatype:"enum",onerror:"公司电话格式不正确"});	
	        		
			$("#mailAddress").formValidator({onshow:"邮箱地址,可保证重要信息的正常反馈",onfocus:"输入邮箱地址",oncorrect:"您输入了合法的邮箱地址"})
				.inputValidator({min:1,onerror:"邮箱地址不能为空"})
				.regexValidator({regexp:"email",datatype:"enum",onerror:"输入的邮箱地址格式不正确"})
				.inputValidator({max:50,onerror:"邮箱地址不能超过50个字"});
			 $("#companyContactor").formValidator({onshow:"公司的联系人",onfocus:"输入公司的联系人",oncorrect:"输入了公司联系人"})
			.inputValidator({min:1,onerror:"公司联系人不能为空"})
			.inputValidator({max:10,onerror:"公司联系人不能超过10个字"})
			.regexValidator({regexp:"char",datatype:"enum",onerror:"公司联系人不能输入特殊字符"});
			
		    $("#companyHomePage").formValidator({onshow:"请输入公司的主页,例如http://www.mt.com",onfocus:"请输入公司的主页,例如http://www.mt.com",oncorrect:"输入了公司的主页"})
	        .inputValidator({min:1,onerror:"公司主页不能为空"})
	        .inputValidator({max:100,onerror:"公司主页不能超过100个字符"})
	        .regexValidator({regexp:"url",datatype:"enum",onerror:"公司网址格式不正确"});	
	        
	        setMenu("zhuche");//设置菜单显示选中项 
		    });
	
	        
	</script>
  </head>
  
  <body class="ContentBody">
  	<%@ include file="/page/commen/top.jsp" %>
		<div class="left">	
				 <p class="description registerImg">用户注册</p>
		 <div class="inputContent">
		 <p class="title">注册信息录入</p>
    <form action="doRegister.do" method="post"   name="CustomInfoForm" id="CustomInfoForm">
    	<div class="MainDiv">
    		<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
				<tr>
			      	<th class="tablestyle_title"></th>
			  	</tr>
			  	<tr>
			  		<td class="CPanel">
			  			<table class="regiseter">
			  				<tr>
												<td colspan="3" align="center" style="border: 0px">
													 <div class="opdiv" style="   font-size: 12px;height: auto; padding: 5px; text-align: left;background-color: #FFF2E9">
													 <b><span id="errormsg">请认真填写以下资料 - 带 <span class="red">*</span> 号项为必填项</span> </b> 
													 </div>
												</td>
											</tr>
	  										<tr>
	  											<td  class="title">公司名称:</td>
	  											<td align="left">
	  												<input type="text" class="inputText" id="companyName" name="customInfoDTO.companyName" maxlength="50"/><span class="red">*</span>
	  											</td>
	  											<td align="left" class="tip"><div id="companyNameTip"></div></td>
	  										</tr>
			  							    <tr>
			  									<td class="title">公司邮箱:</td>
											    <td ><input class="inputText"  id="mailAddress" name="customInfoDTO.mailAddress" maxlength="50"></input>
											     <span class="red">*</span>
											    </td>
			  									<td align="left"  class="tip"><div id="mailAddressTip"></div></td>
			  								</tr>
			  							    <tr>
			  									<td class="title">公司电话:</td>
											    <td ><input class="inputText"  id="companyTel" name="customInfoDTO.companyTel" maxlength="20"></input>
											    <span class="red">*</span>
											    </td>
			  									<td align="left"   class="tip"><div id="companyTelTip"></div></td>
			  								</tr>
			  								 <tr>
			  									<td class="title">公司地址:</td>
											    <td><input class="inputText"  id="companyAddress" name="customInfoDTO.companyAddress" maxlength="100"></input> 
											    </td>
			  									<td align="left"  class="tip"><div id="companyAddressTip"></div></td>
			  								</tr>
			  								<tr>
			  									<td class="title">手机号码:</td>
											    <td ><input class="inputText"  id="mobileNumber" name="customInfoDTO.mobileNumber" maxlength="11"></input>
											     <span class="red">*</span>
											    </td>
			  									<td align="left"   class="tip"><div id="mobileNumberTip"></div></td>
			  								</tr>
			  								<tr>
			  									<td class="title">传真:</td>
											    <td ><input class="inputText"  id="companyFax" name="customInfoDTO.companyFax" maxlength="20"></input></td>
			  									<td align="left"   class="tip"><div id="companyFaxTip"></div></td>
			  								</tr>
			  								<tr>
			  									<td class="title">联系人:</td>
											    <td ><input class="inputText" id="companyContactor" name="customInfoDTO.companyContactor" maxlength="10"></input>
											     <span class="red">*</span>
											    </td>
			  									<td align="left"   class="tip"><div id="companyContactorTip"></div></td>
			  								</tr>
			  								<tr>
			  									<td class="title">公司主页:</td>
											    <td ><input class="inputText" id="companyHomePage" name="customInfoDTO.companyHomePage" maxlength="100"></input>
											     <span class="red">*</span>
											    </td>
			  									<td align="left"   class="tip"><div id="companyHomePageTip"></div></td>
			  				</tr>
			  				<tr>
			  					<td colspan="3" align="center" >
			  						<input type="submit" name="Submit" value="同意以下条款 并注册" class="commentBut"/>　
			  					</td>
			  				</tr>
			  			</table>
			  		</td>
			  	</tr>
			</table>
    	</div>
    </form>
   <div class="opdiv" style=" height: 100px;
    margin: 5px 0px 10px 30px;
    overflow-y: auto;
    padding: 5px 20px 0;
    width: 500px;">
<span class="red">软件许可协议</span><br/>
${parameterMap['agreement']}

   </div>
    </div>
  </div>
  
  	<div id="right">
	<%@ include file="/page/commen/login.jsp" %>	
	<%@ include file="/page/commen/download.jsp" %>	
	<%@ include file="/page/commen/contactUs.jsp" %>
		</div>	
			<%@ include file="/page/commen/foot.jsp" %>	
  </body>
</html>
